package com.lovo.sercive.impl;


import com.lovo.bean.CommentBean;
import com.lovo.dao.ICommentDao;
import com.lovo.sercive.ICommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements ICommentService {
    @Autowired
    private ICommentDao dao;

    @Override
    public List<CommentBean> findAllCommentByPostId(int id) {
        return dao.findAllCommentByPostId(id);
    }

    @Override
    public void addComment(CommentBean comment) {
        dao.addComment(comment);
    }
}
